/* style.css */
:root {
    --primary-color: #4a6fa5;
    --secondary-color: #166088;
    --background-color: #f8f9fa;
    --text-color: #333;
    --light-gray: #e9ecef;
    --gray: #adb5bd;
    --white: #fff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--light-gray);
}

h1 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.input-group {
    display: flex;
    gap: 10px;
}

input[type="text"] {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--gray);
    border-radius: 4px;
    font-size: 16px;
}

button {
    padding: 10px 15px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: var(--secondary-color);
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-btn {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.filter-btn.active {
    background-color: var(--primary-color);
    color: var(--white);
}

#taskList {
    list-style: none;
    margin-bottom: 20px;
}

.task-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background-color: var(--light-gray);
    border-radius: 4px;
    margin-bottom: 8px;
    transition: all 0.3s;
}

.task-item:hover {
    background-color: #dee2e6;
}

.task-checkbox {
    margin-right: 10px;
    cursor: pointer;
}

.task-text {
    flex: 1;
}

.completed .task-text {
    text-decoration: line-through;
    color: var(--gray);
}

.delete-btn {
    background-color: #dc3545;
    margin-left: 10px;
    padding: 5px 10px;
    font-size: 14px;
}

.delete-btn:hover {
    background-color: #c82333;
}

footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid var(--light-gray);
}

#clearCompleted {
    background-color: var(--gray);
}

#clearCompleted:hover {
    background-color: #5a6268;
}

/* 响应式设计 */
@media (max-width: 600px) {
    .container {
        padding: 15px;
    }
    
    .input-group, .filter-buttons {
        flex-direction: column;
    }
    
    button, input[type="text"] {
        width: 100%;
    }
}